From: Keir Fraser Date: Wed, 24 Jun 2009 10:15:31 +0000 (+0100) Subject: VT-d: don't disable VT-d engine in suspend for security purpose X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13698 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3890bbbfc3d4713e05f8140d6af537f3fa9a7eca;p=xen.git VT-d: don't disable VT-d engine in suspend for security purpose force_iommu option is used to force enabling and using IOMMU for security purpose. So when force_iommu is set, it shouldn't disable VT-d engines in suspend. Signed-off-by: Weidong Han --- diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 25e5fa9c1a..e471e815ed 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1877,6 +1877,10 @@ void iommu_suspend(void) iommu_state[i][DMAR_FEUADDR_REG] = (u32) dmar_readl(iommu->reg, DMAR_FEUADDR_REG); + /* don't disable VT-d engine when force_iommu is set. */ + if ( force_iommu ) + continue; + iommu_disable_translation(iommu); if ( iommu_intremap )